package com.bct.jxc.view;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.bct.jxc.model.Product;
import com.bct.jxc.model.Provider;

public class MainAction {
	/**
	 *  点击跳转到“客户信息管理界面”
	 * @return
	 */
	public static ActionListener clickCustomerInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				CustomerInternalFrame cuInternalFrame = new CustomerInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 * 点击跳转到“客户查询界面”
	 * @return
	 */
	public static ActionListener clickCustomerInfoSearch() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				CustomerInfoSearchFrame infoSearchFrame = new CustomerInfoSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(infoSearchFrame);
				infoSearchFrame.setVisible(true);
			}
		};
	}
	/**
	 *  点击跳转到“供应商信息管理界面”
	 * @return
	 */
	public static ActionListener clickProviderInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ProviderInternalFrame cuInternalFrame = new ProviderInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 * 点击跳转到“供应商查询界面”
	 * @return
	 */
	public static ActionListener clickProviderInfoSearch() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ProviderInfoSearchFrame infoSearchFrame = new ProviderInfoSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(infoSearchFrame);
				infoSearchFrame.setVisible(true);
			}
		};
	}
	/**
	 * 点击跳转到“商品查询界面”
	 * @return
	 */
	public static ActionListener clickProductInfoSearch() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ProductInfoSearchFrame infoSearchFrame = new ProductInfoSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(infoSearchFrame);
				infoSearchFrame.setVisible(true);
			}
		};
	}
	/**
	 *  点击跳转到“商品信息管理界面”
	 * @return
	 */
	public static ActionListener clickProductInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ProductInternalFrame cuInternalFrame = new ProductInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 *  点击跳转到“进货单信息管理界面”
	 * @return
	 */
	public static ActionListener clickInportInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				InportInternalFrame cuInternalFrame = new InportInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 * 点击跳转到“入库查询界面”
	 * @return
	 */
	public static ActionListener clickInportInfoSearch() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				InportInfoSearchFrame infoSearchFrame = new InportInfoSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(infoSearchFrame);
				infoSearchFrame.setVisible(true);
			}
		};
	}
	/**
	 *  点击跳转到“操作员信息管理界面”
	 * @return
	 */
	public static ActionListener clickUserInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				UserInternalFrame cuInternalFrame = new UserInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 *  点击跳转到“操作员密码修改界面”
	 * @return
	 */
	public static ActionListener clickChangePwdFrame() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				ChangePwdInternalFrame cuInternalFrame = new ChangePwdInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	
	/**
	 *  点击跳转到“进货退货信息管理界面”
	 * @return
	 */
	public static ActionListener clickOutportInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				OutportInternalFrame cuInternalFrame = new OutportInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 * 点击跳转到“退货查询界面”
	 * @return
	 */
	public static ActionListener clickOutportInfoSearch() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				OutportInfoSearchFrame infoSearchFrame = new OutportInfoSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(infoSearchFrame);
				infoSearchFrame.setVisible(true);
			}
		};
	}
	/**
	 *  点击跳转到“销售信息管理界面”
	 * @return
	 */
	public static ActionListener clickSaleInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				SaleInternalFrame cuInternalFrame = new SaleInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 *  点击跳转到“销售退货信息管理界面”
	 * @return
	 */
	public static ActionListener clickSalebackInfoManager() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				SalebackInternalFrame cuInternalFrame = new SalebackInternalFrame();
				MainFrame.getMainFrame().getContentPane().add(cuInternalFrame);//将此面板添加到主界面上
				cuInternalFrame.setVisible(true);				
			}
		};
	}
	/**
	 * 点击跳转到“销售查询界面”
	 * @return
	 */
	public static ActionListener clickSaleInfoSearch() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				SaleInfoSearchFrame infoSearchFrame = new SaleInfoSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(infoSearchFrame);
				infoSearchFrame.setVisible(true);
			}
		};
	}
	/**
	 * 点击跳转到“销售退货查询界面”
	 * @return
	 */
	public static ActionListener clickSalebackInfoSearch() {
		return new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent e) {
				SalebackInfoSearchFrame infoSearchFrame = new SalebackInfoSearchFrame();
				MainFrame.getMainFrame().getContentPane().add(infoSearchFrame);
				infoSearchFrame.setVisible(true);
			}
		};
	}
}
